Skip to content

Let the application own the MUSE_COMPILE_USE_PCH option - #254

Closed
luapmartin wants to merge 2 commits into
musescore:mainfrom
luapmartin:luapmartin/app-owned-pch-option
Closed

luapmartin wants to merge 2 commits into
musescore:mainfrom
luapmartin:luapmartin/app-owned-pch-option

Conversation

@luapmartin

@luapmartin luapmartin commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Tracker with the merge order: audacity/audacity#11898.

Removes the MUSE_COMPILE_USE_PCH declaration from MuseDeclareOptions.cmake. The framework keeps reading the option; the application declares it, like MUSE_COMPILE_USE_UNITY, and no longer has to declare it first to control the default (audacity/audacity#11795).

An application that does not declare it builds without PCH, silently. audacity/audacity#11900 and musescore/MuseScore#34791 (one line each) must merge before each application bumps its muse submodule past this PR. This PR itself can merge before or after them.

The standalone CMakeLists.txt declares both options OFF, so a standalone framework build is strict by default (possible since #256). The unit-test job still forces unity ON in ninja_build_utests.sh; the CI net for the fully strict configuration is audacity/audacity#12246.

  • I signed the CLA
  • The title of the PR describes the problem it addresses.
  • Each commit's message describes its purpose and effects, and references the issue it resolves. If changes are extensive, there is a sequence of easily reviewable commits.
  • The code in the PR follows the coding rules.
  • I understand all aspects of the code I'm contributing and I'm able to explain it if requested.
  • The code compiles and runs on my machine, preferably after each commit individually. I have manually tested and verified that my changes fulfil their intended purpose.
  • No prior attempts to resolve this problem exist, or if they do, I listed them in my PR description and described how I avoided repeating past mistakes.
  • There are no unnecessary changes.
  • I created a unit test or vtest to verify the changes I made (if applicable).

Build configuration

audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: musescore/MuseScore/main
musescore platforms: linux_x64

@luapmartin
luapmartin requested a review from kryksyh August 28, 2026 12:17
@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 1a8e7664-faeb-48d4-bda7-420a12ad46ec

📥 Commits

Reviewing files that changed from the base of the PR and between a0e9f48 and 9b35bd4.

📒 Files selected for processing (1)
  • CMakeLists.txt

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The top-level CMakeLists.txt now declares cached MUSE_COMPILE_USE_PCH and MUSE_COMPILE_USE_UNITY options with default values of OFF. The framework CMake option declarations no longer define MUSE_COMPILE_USE_PCH.

Merge Risk: ⚪ Minimal · up to 9b35b

This change moves ownership of the PCH build option to the application and keeps the standalone framework build explicitly disabled; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The framework changes remove the option declaration and add standalone-build defaults, but linked issue [#11898] requires adding option(MUSE_COMPILE_USE_PCH "Use precompiled headers." ON) to Audacity'… Add the required MUSE_COMPILE_USE_PCH option to Audacity's root CMakeLists.txt before including the framework options, or provide explicit evidence that this PR is only the framework-side prerequisite and that the linked issue is intentiona…
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed The changes are limited to framework option ownership and standalone-build defaults. Both changes support the stated objectives and no unrelated code changes are identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Title check ✅ Passed The title clearly states the main change: applications own the MUSE_COMPILE_USE_PCH option.
Description check ✅ Passed The description clearly explains the change, motivation, merge order, standalone build behavior, testing status, and checklist. It does not use the template's required Resolves: #NNNNN`` line, but it …
Full details: Linked Issues check

Explanation

The framework changes remove the option declaration and add standalone-build defaults, but linked issue [#11898] requires adding option(MUSE_COMPILE_USE_PCH "Use precompiled headers." ON) to Audacity's root CMakeLists.txt before framework options are included.

Resolution

Add the required MUSE_COMPILE_USE_PCH option to Audacity's root CMakeLists.txt before including the framework options, or provide explicit evidence that this PR is only the framework-side prerequisite and that the linked issue is intentionally resolved by a separate consumer-repository change.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@luapmartin
luapmartin force-pushed the luapmartin/app-owned-pch-option branch 2 times, most recently from 015f2c3 to 82dc7f3 Compare August 28, 2026 23:48
@luapmartin

Copy link
Copy Markdown
Contributor Author

Closing after discussion with Igor: framework options stay declared in the framework, and an application overrides one by setting it before including the framework. The two options still declared only app-side (MUSE_COMPILE_USE_UNITY, MUSE_COMPILE_USE_SHARED_LIBS_IN_DEBUG) get folded into the framework in a follow-up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant